package com.situ.mall.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.situ.mall.common.entity.Cart;
import com.situ.mall.common.entity.MemberAddress;
import com.situ.mall.common.vo.CartVO;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 闫佳宁
 * @since 2023-09-18
 */
public interface CartMapper extends BaseMapper<Cart> {

//    void save2(@Param("productId") Integer pId, @Param("number") Integer number);

    List<CartVO> select2(Integer memberId);

    @Delete("delete from cart where id = #{id}")
    void delete(Integer id);

    @Update("update cart set number = #{number} where id = #{id}")
    void update(@Param("id") Integer id, @Param("number") Integer number);

    List<CartVO> select3(String[] split);
    @Select("select * from member_address")
    List<MemberAddress> select4();

}
